Fix some bugs in Util.fixupPCIDescription(), that caused all device
descriptions to be empty.
https://bugzilla.gnome.org/show_bug.cgi?id=646074
'Incorporated',
'Ltd.',
'Limited.',
- 'Intel?',
+ 'Intel',
'chipset',
'adapter',
'[hex]',
];
function fixupPCIDescription(desc) {
- desc.replace(/[_,]/, ' ');
+ desc = desc.replace(/[_,]/, ' ');
/* Attempt to shorten ID by ignoring certain phrases */
for (let i = 0; i < _IGNORED_PHRASES.length; i++) {
/* Attmept to shorten ID by ignoring certain individual words */
let words = desc.split(' ');
let out = [ ];
- for (let i = 0; i < words; i++) {
+ for (let i = 0; i < words.length; i++) {
let item = words[i];
// skip empty items (that come out from consecutive spaces)